/*
 * @Author: WangLong
 * @Date: 2024-05-21 11:03:46
 * @LastEditTime: 2024-05-23 10:09:57
 * @LastEditors: WangLong
 * @Description:
 * @FilePath: \front_erp\src\api\sales\projectRequirements.js
 */
import request from "@/utils/request";

// 查询项目需求列表
export function getProjectRequirementListApi(query, data) {
  return request({
    url: "/system/requirement/selectProjectRequirementList",
    method: "post",
    params: query,
    data,
  });
}
//新增项目需求
export function requirementAdd(data) {
  return request({
    url: "/system/requirement/add",
    method: "post",
    data,
  });
}
//修改项目需求
export function requirementEdit(data) {
  return request({
    url: "/system/requirement/edit",
    method: "post",
    data,
  });
}
// 新增获取项目详细信息
export function getProjectGetInfoAdd(projectId) {
  return request({
    url: `/system/project/getInfo`,
    method: "get",
    params: { projectId },
  });
}
// 查询甲方联系人分页列表
export function selectPracticeInfosByProjectIdAdd(query, data) {
  return request({
    url: `/system/busSchedule/selectPracticeInfosByProjectId`,
    method: "post",
    params: query,
    data,
  });
}
// 查询销售清单分页列表
export function selectSaleByProjectIdAdd(query, data) {
  return request({
    url: `/system/busSchedule/selectSaleByProjectId`,
    method: "post",
    params: query,
    data,
  });
}
// 查询获取项目详细信息
export function getProjectGetInfo(projectId) {
  return request({
    url: `/system/project/getInfo`,
    method: "get",
    params: { projectId },
  });
}
//获取项目需求详细信息
export function requirementGetInfo(data) {
  return request({
    url: "/system/requirement/getInfo",
    method: "post",
    data,
  });
}
// 获取项目需求发起次数
export function getRequirementCount(projectId) {
  return request({
    url: `/system/requirement/getRequirementCount`,
    method: "get",
    params: { projectId },
  });
}
//项目需求详情甲方联系人分页列表
export function selectPracticeInfosByProjectId(query, data) {
  return request({
    url: "/system/requirement/selectPracticeInfosByProjectId",
    method: "post",
    params: query,
    data,
  });
}
//项目需求详情销售清单分页列表
export function selectSaleByProjectId(query, data) {
  return request({
    url: "/system/requirement/selectSaleByProjectId",
    method: "post",
    params: query,
    data,
  });
}
//删除项目需求
export function getRequirementRemove(projectRequirementId) {
  return request({
    url: `/system/requirement/remove`,
    method: "get",
    params: { projectRequirementId },
  });
}
//审核项目需求-撤回项目需求-提交项目需求
export function requirementCheck(data) {
  return request({
    url: "/system/requirement/check",
    method: "post",
    data,
  });
}
//项目需求详细信息
export function requirePullProject(data) {
  return request({
    url: "/system/project/selectRequirePullProjectList",
    method: "post",
    data,
  });
}
// 审核进度
export function selectAuditList(deliveryApplyId,flowUuid) {

  return request({
    url: `/system/requirement/selectAuditList`,
    method: "get",
    params: { deliveryApplyId ,flowUuid:flowUuid || "-1"},
  });
}
